<?php

namespace lib\Server\Service;
;

use App\App;
use lib\Server\Http\Request;
use lib\Server\Http\Response;

class HttpService
{
	public $request;
	public $response;
	public $base_namespace;

	public function __construct($container=null)
	{
		$this->base_namespace = $container;
	}

	/**
	 * @param $request
	 * @param $response
	 * @return mixed
	 */
	public function handler($request, $response)
	{
		$this->request  = new Request(@$request->header,@ $request->get, @$request->post, @$request->rawContent(), @$request->files, @$request->cookie, @$request->server);
		$this->response = new Response(@$this->request, $response);
		return App::run($this);
	}

}


